package com.amigo.online.provider.manager.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.amigo.online.provider.manager.mapper.AdvHomeApplyAreaTblMapper;
import com.amigo.online.provider.manager.mapper.AdvHomeSourceTblMapper;
import com.amigo.online.provider.manager.mapper.AdvHomeStockTblMapper;
import com.amigo.online.provider.manager.model.entity.AdvHomeApplyAreaTbl;
import com.amigo.online.provider.manager.model.entity.AdvHomeSourceTbl;
import com.amigo.online.provider.manager.model.entity.AdvHomeStockTbl;
import com.amigo.online.provider.manager.result.AdvHomeInfo;
import com.amigo.online.provider.manager.service.AdvHomeInfoService;

@Service
public class AdvHomeInfoServiceImpl implements AdvHomeInfoService {

    @Resource
    private AdvHomeSourceTblMapper advHomeSourceTblMapper;// 资源表

    @Resource
    private AdvHomeStockTblMapper advHomeStockTblMapper;

    @Resource
    private AdvHomeApplyAreaTblMapper advHomeApplyAreaTblMapper;

    @Override
    public AdvHomeInfo findAdvHomeApplyTblParticulars(Long id) {
        List<AdvHomeSourceTbl> advHomeSourceTblList = advHomeSourceTblMapper.findAdvHomeSourceList(id);
        AdvHomeStockTbl advHomeStockTbl = advHomeStockTblMapper.findAdvHomeStockTbl(id);
        List<AdvHomeApplyAreaTbl> advHomeApplyAreaTblList = advHomeApplyAreaTblMapper.findAdvHomeApplyAreaTblList(id);
        AdvHomeInfo ahi = new AdvHomeInfo();
        ahi.setAdvHomeApplyAreaTbl(advHomeApplyAreaTblList);
        ahi.setAdvHomeSourceTbllist(advHomeSourceTblList);
        ahi.setAdvHomeStockTbl(advHomeStockTbl);
        return ahi;
    }


}
